Public Class FormCarnet
    Private Lector As New ClaseLector

    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        FormCarnetImprimir.ShowDialog()
        Me.Dispose()
    End Sub
    Private Sub Carnet_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        Me.Dispose()
    End Sub

    Private Sub FormCarnet_HelpRequested(ByVal sender As Object, ByVal hlpevent As System.Windows.Forms.HelpEventArgs) Handles Me.HelpRequested
        HPCarnet.SetHelpNavigator(Me, HelpNavigator.TopicId)
        HPCarnet.SetHelpKeyword(Me, "25")
    End Sub

    Private Sub Carnet_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        SetUpForm(Me)
        HPCarnet.HelpNamespace = My.Settings.cadenaAyuda
        Lector = New ClaseLector
        Dim indice As Integer = -1
        Try
            indice = FormPrincipal.dgvPrincipal.CurrentRow.Index
        Catch ex As Exception
            MsgBox("No se encuentran Registos para Mostrar en Barra de Datos.")
        End Try
        If indice >= 0 Then
            Try
                Dim id As Integer
                id = CInt(FormPrincipal.dgvPrincipal.Rows(indice).Cells(0).Value)
                Me.Label16.Text = CStr(id)
                Lector.DevolverUno(id)
                With Me
                    .PictureBox1.Image = Lector.FOTO.Foto
                    .Label10.Text = Lector.NOMBRE
                    .Label2.Text = Lector.APELLIDO & " " & Lector.NOMBRE
                    .Label11.Text = Lector.APELLIDO
                    .Label13.Text = Lector.CURSO.nombreCURSO
                    '.lblObservacionesLector.Text = Lector.OBSERVACIONES
                    .Label17.Text = Lector.TIPO.nombreTIPO
                    .Label15.Text = Lector.DNI
                    .Label12.Text = Lector.DIRECCION
                    '.lblFechNacLector.Text = Format(Lector.FECHANAC, "dd/MM/yyyy")
                    '.lblSexoLector.Text = Lector.SEXO
                    .Label14.Text = Lector.EMAIL
                    .Label16.Text = CStr(Lector.ID)
                End With
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End If
    End Sub
End Class